// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property,executeInEditMode} = cc._decorator;

@ccclass
@executeInEditMode
export default class miniGame_editorLevel extends cc.Component {
    //记录关卡数据  缩放大小,角度,位置
    protected onLoad(): void {
        let pigPosArr=[];
        for(let i=0;i<this.node.childrenCount;i++){
            let node=this.node.children[i];
            let obj={
                x:Math.trunc(node.x),
                y:Math.trunc(node.y),
                angle:Math.trunc(node.angle)
            }
            pigPosArr.push(obj);
        }
        cc.log(JSON.stringify(pigPosArr));
    }
}
